const { merge } = require('webpack-merge');
const baseWebpackConfig = require('./webpack_base');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = merge(baseWebpackConfig, {
    mode: 'production',
    output: {
        filename: 'js/[name].[chunkhash:6].js',
    },
    plugins: [
        new CleanWebpackPlugin() // 打包前清除输出目录
    ]
});